import java.util.Arrays;

public class Learn14 {
    public static void transform(int[] array){
        for (int i = 0; i < array.length; i++) {
            array[i] = 2 * array[i];
        }
    }


    public static void main(String[] args) {
        int[] array = {1,2,3};
        transform(array);     //改变原有数组元素的值
        for (int x:array) {
            System.out.print(x + " ");
        }

        //System.out.println(Arrays.toString(array));
    }
}
